<script type="text/javascript">

system.initWysiwyg();

</script>

<form action="{plink AdminNews:saveNew 'id'=>$id}" method="post" id="form">
<table>
	<tbody>
			<tr>
				<td>
					Nadpis:
				</td>
				<td>
					<input type="text" name="title" value="{$edit["title"]}" />
				</td>
			</tr>
			<tr>
				<td>
					Perex:
				</td>
				<td>
					<textarea name="perex" class="mceEditor">{$edit["perex"]}</textarea>
				</td>
			</tr>
			<tr>
				<td>
					Obsah:
				</td>
				<td>
					<textarea name="content" class="mceEditor">{$edit["content"]}</textarea>
				</td>
			</tr>	
			<tr>
				<td>
					Odeslat newsletter:
				</td>
				<td>
					<input type="checkbox" name="newsletter" value="ano" />
				</td>
			</tr>			
			<tr>
				<td>
					Obrázek:
				</td>
				<td>
					<div id="pictures">
								<div id="pic">
									<img id="img" src="{$baseUri}upload/{$picture["path"]}{$picture["th_name"]}"></img>
									<input type="hidden" id="id_file" name="id_file" value="{$edit["id_file"]}" />
									<span onclick='news.deletePicture()'>&times;</span>
								</div>
							</div>
					</div>
				</td>
			</tr>
			<tr>
				<td></td>
				<td>
					<input type="submit" value="Uložit" />
				</td>
			</tr>
			<input type="hidden" name="id_news" value="{$edit["id_news"]}" />
			<input type="hidden" name="id_language" value="{$id_lang}" />
	</tbody>
</table>

</form>

{snippet files}
	{!$files}
{/snippet}

<a href="{$baseUri}admin/system/view-files/?do=viewDirectory" onclick="files.changeDirectory(this, 0); return false;">Načti soubory</a>

<script type="text/javascript">
	files.changeDirectory();
</script>
